home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / LIB / MochiBot.as < prev   
Encoding:
Text File  |  2010-05-14  |  1.8 KB  |  62 lines

  1. package Code.LIB
  2. {
  3.    import flash.display.Loader;
  4.    import flash.display.Sprite;
  5.    import flash.net.URLRequest;
  6.    import flash.net.URLRequestMethod;
  7.    import flash.net.URLVariables;
  8.    import flash.system.Capabilities;
  9.    import flash.system.Security;
  10.    
  11.    public dynamic class MochiBot extends Sprite
  12.    {
  13.       public function MochiBot()
  14.       {
  15.          super();
  16.       }
  17.       
  18.       public static function track(param1:Sprite, param2:String) : MochiBot
  19.       {
  20.          var _loc3_:MochiBot = null;
  21.          var _loc4_:String = null;
  22.          var _loc5_:URLVariables = null;
  23.          var _loc6_:String = null;
  24.          var _loc7_:URLRequest = null;
  25.          var _loc8_:Loader = null;
  26.          if(Security.sandboxType == "localWithFile")
  27.          {
  28.             return null;
  29.          }
  30.          _loc3_ = new MochiBot();
  31.          param1.addChild(_loc3_);
  32.          Security.allowDomain("*");
  33.          Security.allowInsecureDomain("*");
  34.          _loc4_ = "http://core.mochibot.com/my/core.swf";
  35.          _loc5_ = new URLVariables();
  36.          _loc5_["sb"] = Security.sandboxType;
  37.          _loc5_["v"] = Capabilities.version;
  38.          _loc5_["swfid"] = param2;
  39.          _loc5_["mv"] = "8";
  40.          _loc5_["fv"] = "9";
  41.          _loc6_ = _loc3_.root.loaderInfo.loaderURL;
  42.          if(_loc6_.indexOf("http") == 0)
  43.          {
  44.             _loc5_["url"] = _loc6_;
  45.          }
  46.          else
  47.          {
  48.             _loc5_["url"] = "local";
  49.          }
  50.          _loc7_ = new URLRequest(_loc4_);
  51.          _loc7_.contentType = "application/x-www-form-urlencoded";
  52.          _loc7_.method = URLRequestMethod.POST;
  53.          _loc7_.data = _loc5_;
  54.          _loc8_ = new Loader();
  55.          _loc3_.addChild(_loc8_);
  56.          _loc8_.load(_loc7_);
  57.          return _loc3_;
  58.       }
  59.    }
  60. }
  61.  
  62.